home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 4212 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: dispatch.news.demon.net!demon!user
  2. From: andy@ajdean.demon.co.uk (Andy Dean)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Wanted: Color reduction algorithm.
  5. Date: Sun, 25 Feb 1996 22:31:30 +0000
  6. Organization: Private node
  7. Distribution: world
  8. Message-ID: <AD5693C296681550C@ajdean.demon.co.uk>
  9. References: <Ronald.07co@noblehouse.xs4all.nl>
  10. NNTP-Posting-Host: ajdean.demon.co.uk
  11. X-NNTP-Posting-Host: ajdean.demon.co.uk
  12.  
  13. In article <Ronald.07co@noblehouse.xs4all.nl>,
  14. Ronald@noblehouse.xs4all.nl (Ronald van Eijck) wrote:
  15.  
  16. >Hi,
  17. >
  18. >I'm looking for some source code that can reduce a colormap
  19. >from x entries to y entries eliminating colors that are
  20. >closest together. I'll probably need to be able to lock a
  21. >number of colours that are used in cycles etc. but If I got
  22. >the basic algorithm I can add that myself. I do not want
  23. >to use the 3.0 obtainbestpen etc functions because these do
  24. >not deal with whole colormaps at a time and I doubt that if
  25. >I do an obtainbestpen for every colour that I'll get very
  26. >good results.
  27.  
  28. The most popular algorithm is the "Heckbert Median Cut" algorithm
  29. which gives good results for most cases. The Independant JPEG
  30. Group code which is available on Aminet as:
  31.  
  32.     gfx/conv/jpegV6src.lha
  33.  
  34. contains a very fast and high quality version of the algorithm.
  35.  
  36. You do not say whether your source colourmap belongs to an
  37. image, in which case the number of pixels using each particular
  38. colour will influence the best choice of colours for the
  39. destination colourmap. Either way, the IJG algorithm can be
  40. used easily.
  41.  
  42.  
  43.